# This Python file uses the following encoding: utf-8
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
admin.autodiscover()

#site_media
import os.path
site_media = os.path.join(
   os.path.dirname(__file__), 'site-css'
)

#urlpatterns
urlpatterns = patterns('',
    # Example:
    (r'^menu/$', 'utils.views.menu'),
    #(r'^$', 'missatgeria.views.elMeuMur'),
    #(r'^$', 'presencia.views.mostraImpartir'),       
    url(r'^$', 'utils.views.menu', name = "blanc__blanc__blanc"),       
    (r'^alumnes/', include('alumnes.urls')),
    #(r'^horaris/', include('horaris.urls')),
    (r'^extKronowin/', include('extKronowin.urls')),
    (r'^presencia/', include('presencia.urls')),
    (r'^incidencies/', include('incidencies.urls')),
    (r'^missatgeria/', include('missatgeria.urls')),
    (r'^usuaris/', include('usuaris.urls')),
    (r'^utils/', include('utils.urls')),
    (r'^tutoria/', include('tutoria.urls')),
    (r'^avaluacioQualitativa/', include('avaluacioQualitativa.urls')),
    (r'^todo/', include('todo.urls')),
    (r'^sortides/', include('sortides.urls')),
    (r'^baixes/', include('baixes.urls')),
    (r'^open/', include('relacioFamilies.urls')),
    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    # Login i logout automàtics
    (r'^login/$', 'django.contrib.auth.views.login'),
    (r'^password_change/$', 'django.contrib.auth.views.password_change', {'post_change_redirect': '/'}),
    (r'^logout/$', 'utils.views.logout_page'),
    #fitxers estàtics:
    (r'^site-css/(?P<path>.*)$', 'django.views.static.serve',{'document_root': site_media}),

)
